#ifndef __DATA_GLOBAL_H__
#define __DATA_GLOBAL_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <pthread.h>
#include <sys/ipc.h>
#include <sys/socket.h>
#include <sys/msg.h>
#include <errno.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>

#define OM 1
#define DATA 2
#define RTE 3

#define NODE OM      //The current module  node

#define StepLevel 1

typedef  signed char        s8,  S8,  Sint8, CHAR;
typedef  signed short       s16, S16, Sint16;
typedef  signed int         s32, S32, Sint32;
typedef  unsigned char      u8,  U8,  Uint8,  UINT8,	BYTE;
typedef  unsigned short		 u16, U16, Uint16, UINT16;
typedef  unsigned int 		 u32, U32, Uint32, UINT32;
typedef  unsigned long long  u64;
typedef  signed int			 BOOL;
typedef  signed char  		 SYS_STATUS;
typedef  signed int  		 STATUS;
typedef  signed int 			 SOCKET;
typedef  signed int			 MSG_Q_ID;
typedef  unsigned short int	 WORD;
typedef  struct sockaddr_in	 SOCKADDR_IN;
typedef  struct sockaddr		 SOCKADDR;
typedef  struct timeval 		 TIMEVAL;
typedef  pthread_t			 TASK_ID;


typedef struct
{
    long MsgType;           //    Message type
    u16  u16MsgID;			//    Message ID
    u16  u16Rsv;			//
    u16  u16SrcID;			//    Message sorce module ID
    u16  u16DstID;			//    Message destination module ID
    u8*	 pu8Data;			//    Message data part head address, set NULL if no data
    u32  u32DataLen;		//    Message data part length, set 0 if no data
    u32  u32MsgLen;			//    Message Struct length
} STRU_MSG_HEADER;

#endif